# Maintainer: Santiago Torres-Arias <santiago@archlinux.org>
# Maintainer: nblock <nblock [/at\] archlinux DOT us>
# Contributor: Thomas Conneely <tc116 at le dot ac dot uk>

pkgname=python-bitstring
pkgver=3.1.9
pkgrel=4
pkgdesc='Python module designed to help make the creation, manipulation and analysis of binary data as simple and natural as possible'
arch=('any')
url="https://scott-griffiths.github.io/bitstring/"
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/scott-griffiths/bitstring/archive/${pkgname/python-}-${pkgver}.tar.gz")
sha256sums=('32da255b20b93a15260a8498170411ef1f112de5e5011fd0ae81fd834edf5f07')

build() {
  # still unsure why the upstream tarball has the name repeated twice...
  cd "${srcdir}/${pkgname/python-}-${pkgname/python-}-${pkgver}"

  python setup.py build
}

package() {
  cd "${srcdir}/${pkgname/python-}-${pkgname/python-}-${pkgver}"

  python setup.py install --root="${pkgdir}/" --optimize=1
  install -D -m0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set ts=2 sw=2 et:
